package com.nf.health.app.inquiry.bean;

import com.google.gson.Gson;
import com.nf.health.app.core.MyGsonBuilder;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by hepann on 2016/9/23.
 * The only genius that is worth anything is the genius for hard work
 *
 * @author hepann
 * @Description
 * @email he_pann@163.com
 */
public class InquiryDetailBean implements Serializable {

    /**
     * createtime : 1474609458000
     * content : {"images":[],"message":"毋庸置疑"}
     * id : 1719
     * userdesc : 一,男,12岁
     * state : 0
     * userid : 2015120909370899790835
     * del : n
     * userreplynum : 0
     */
    private InquiryBean inquiry;


    /**
     * doctorid : 2016082516205142055379
     * notescoreid : 0
     * nick : 13366667777
     * inquiryreplylist : [{"createtime":1474617797000,"content":"{\"message\":\"偷渡啦啦\",\"type\":\"2\"}","userid":"2015120909370899790835","id":26,"doctorid":"2016082516205142055379","inquiryid":1719,"type":1},{"createtime":1474617795000,"content":"{\"message\":\"谭某某\",\"type\":\"2\"}","userid":"2015120909370899790835","id":25,"doctorid":"2016082516205142055379","inquiryid":1719,"type":1},{"createtime":1474617793000,"content":"{\"message\":\"做头发\",\"type\":\"2\"}","userid":"2015120909370899790835","id":24,"doctorid":"2016082516205142055379","inquiryid":1719,"type":1},{"createtime":1474617789000,"content":"{\"message\":\"饿了科特\",\"type\":\"2\"}","userid":"2015120909370899790835","id":23,"doctorid":"2016082516205142055379","inquiryid":1719,"type":1},{"createtime":1474617786000,"content":"{\"message\":\"马建军\",\"type\":\"2\"}","userid":"2015120909370899790835","id":22,"doctorid":"2016082516205142055379","inquiryid":1719,"type":1},{"createtime":1474617779000,"content":"{\"message\":\"统计数据\",\"type\":\"2\"}","userid":"2015120909370899790835","id":21,"doctorid":"2016082516205142055379","inquiryid":1719,"type":1},{"createtime":1474616120000,"content":"{\"images\":[\"http://test.mbank.nf1000.com/simg/49375d18b80874e472315b4e8db386fe\"],\"message\":\"\",\"type\":\"4\"}","userid":"2015120909370899790835","id":19,"doctorid":"2016082516205142055379","inquiryid":1719,"type":1}]
     * department : 在一起
     * readtype : -1
     * himg : http://test.mbank.nf1000.com/simg/ad20d0e2849a0733b182d1aec7fc44e4
     * hospitalname : asda
     * professional : 你的
     */

    private ArrayList<DoctorlistBean> doctorlist;

    public InquiryBean getInquiry() {
        return inquiry;
    }

    public void setInquiry(InquiryBean inquiry) {
        this.inquiry = inquiry;
    }

    public ArrayList<DoctorlistBean> getDoctorlist() {
        return doctorlist;
    }

    public void setDoctorlist(ArrayList<DoctorlistBean> doctorlist) {
        this.doctorlist = doctorlist;
    }

    public static class InquiryBean implements Serializable {

        //content作为字符串返回,不标准,自建bean类解析
        private ContentBean contentBean;

        private long createtime;
        private String content;
        private String id;
        private String userdesc;
        private String state;
        private String pushdoctorids;
        private String userid;
        private String del;
        private int userreplynum;

        public ContentBean getContentBean() {
            Gson gson = new MyGsonBuilder().createGson();
            contentBean = gson.fromJson(content, ContentBean.class);
            return contentBean;
        }

        public void setContentBean(ContentBean contentBean) {
            this.contentBean = contentBean;
        }
        public long getCreatetime() {
            return createtime;
        }

        public void setCreatetime(long createtime) {
            this.createtime = createtime;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getUserdesc() {
            return userdesc;
        }

        public void setUserdesc(String userdesc) {
            this.userdesc = userdesc;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        public String getPushdoctorids() {
            return pushdoctorids;
        }

        public void setPushdoctorids(String pushdoctorids) {
            this.pushdoctorids = pushdoctorids;
        }

        public String getUserid() {
            return userid;
        }

        public void setUserid(String userid) {
            this.userid = userid;
        }

        public String getDel() {
            return del;
        }

        public void setDel(String del) {
            this.del = del;
        }

        public int getUserreplynum() {
            return userreplynum;
        }

        public void setUserreplynum(int userreplynum) {
            this.userreplynum = userreplynum;
        }
    }

    public static class DoctorlistBean implements Serializable {
        private String doctorid;
        private String notescoreid;
        private String nick;
        private String department;
        private String readtype;
        private String himg;
        private String hospitalname;
        private String professional;
        private String family;//家庭服务 -1 功能不存在 0 未开启 1 已开启
        private String consult;//付费咨询
        private String sound;//健康管理
        private String attention;//关注状态 -1 不能关注 0 未关注 1 已关注 2 不能关注

        public String getAttention() {
            return attention;
        }

        public void setAttention(String attention) {
            this.attention = attention;
        }

        public String getFamily() {
            return family;
        }

        public void setFamily(String family) {
            this.family = family;
        }

        public String getConsult() {
            return consult;
        }

        public void setConsult(String consult) {
            this.consult = consult;
        }

        public String getSound() {
            return sound;
        }

        public void setSound(String sound) {
            this.sound = sound;
        }

        /**
         * createtime : 1474617797000
         * content : {"message":"偷渡啦啦","type":"2"}
         * userid : 2015120909370899790835
         * id : 26
         * doctorid : 2016082516205142055379
         * inquiryid : 1719
         * type : 1
         */

        private List<InquiryreplylistBean> inquiryreplylist;

        public String getDoctorid() {
            return doctorid;
        }

        public void setDoctorid(String doctorid) {
            this.doctorid = doctorid;
        }

        public String getNotescoreid() {
            return notescoreid;
        }

        public void setNotescoreid(String notescoreid) {
            this.notescoreid = notescoreid;
        }

        public String getNick() {
            return nick;
        }

        public void setNick(String nick) {
            this.nick = nick;
        }

        public String getDepartment() {
            return department;
        }

        public void setDepartment(String department) {
            this.department = department;
        }

        public String getReadtype() {
            return readtype;
        }

        public void setReadtype(String readtype) {
            this.readtype = readtype;
        }

        public String getHimg() {
            return himg;
        }

        public void setHimg(String himg) {
            this.himg = himg;
        }

        public String getHospitalname() {
            return hospitalname;
        }

        public void setHospitalname(String hospitalname) {
            this.hospitalname = hospitalname;
        }

        public String getProfessional() {
            return professional;
        }

        public void setProfessional(String professional) {
            this.professional = professional;
        }

        public List<InquiryreplylistBean> getInquiryreplylist() {
            return inquiryreplylist;
        }

        public void setInquiryreplylist(List<InquiryreplylistBean> inquiryreplylist) {
            this.inquiryreplylist = inquiryreplylist;
        }

        public static class InquiryreplylistBean implements Serializable{
            private long createtime;
            private String content;
            private String userid;
            private int id;
            private String doctorid;
            private int inquiryid;
            private int type;

            public long getCreatetime() {
                return createtime;
            }

            public void setCreatetime(long createtime) {
                this.createtime = createtime;
            }

            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }

            public String getUserid() {
                return userid;
            }

            public void setUserid(String userid) {
                this.userid = userid;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getDoctorid() {
                return doctorid;
            }

            public void setDoctorid(String doctorid) {
                this.doctorid = doctorid;
            }

            public int getInquiryid() {
                return inquiryid;
            }

            public void setInquiryid(int inquiryid) {
                this.inquiryid = inquiryid;
            }

            public int getType() {
                return type;
            }

            public void setType(int type) {
                this.type = type;
            }
        }
    }

    public static class ContentBean implements Serializable{
        private String message;
        private ArrayList<String> images;

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        public ArrayList<String> getImages() {
            return images;
        }

        public void setImages(ArrayList<String> images) {
            this.images = images;
        }
    }
}
